home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18src / languages / altamer / makefile
Makefile  |  1994-11-02  |  13KB  |  397 lines

  1. #
  2. # $Id: Makefile,v 1.3 1994/08/31 05:58:56 geoff Exp $
  3. #
  4. # Copyright 1994, Geoff Kuenning, Granada Hills, CA
  5. # All rights reserved.
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions
  9. # are met:
  10. #
  11. # 1. Redistributions of source code must retain the above copyright
  12. #    notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. #    notice, this list of conditions and the following disclaimer in the
  15. #    documentation and/or other materials provided with the distribution.
  16. # 3. All modifications to the source code must be clearly marked as
  17. #    such.  Binary redistributions based on modified source code
  18. #    must be clearly marked as modified versions in the documentation
  19. #    and/or other materials provided with the distribution.
  20. # 4. All advertising materials mentioning features or use of this software
  21. #    must display the following acknowledgment:
  22. #      This product includes software developed by Geoff Kuenning and
  23. #      other unpaid contributors.
  24. # 5. The name of Geoff Kuenning may not be used to endorse or promote
  25. #    products derived from this software without specific prior
  26. #    written permission.
  27. #
  28. # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  29. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31. # ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  32. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  38. # SUCH DAMAGE.
  39. #
  40. # This Makefile allows a single installation to build an alternate
  41. # American variant of ispell's English dictionary.  It depends on the
  42. # languages/english directory for most of its input files.
  43. #
  44. # $Log: Makefile,v $
  45. # Revision 1.3  1994/08/31  05:58:56  geoff
  46. # Create directories before installing into them, and be sure to set the
  47. # proper modes on manual pages.
  48. #
  49. # Revision 1.2  1994/05/17  06:37:43  geoff
  50. # Explicitly specify the affix files with a path so that initial
  51. # installation will work correctly.
  52. #
  53. # Revision 1.1  1994/04/27  02:46:22  geoff
  54. # Initial revision
  55. #
  56. #
  57.  
  58. SHELL = /bin/sh
  59. MAKE = make
  60.  
  61. CONFIG        =    ../../config.sh
  62. PATHADDER    =    ../..
  63. BUILDHASH    =    ../../buildhash
  64.  
  65. # The following variables should be set by the superior Makefile,
  66. # based on the LANGUAGES variable in config.X.
  67. #
  68. # There are four progressively-larger English dictionaries distributed
  69. # with ispell.  These are named english.sml, english.med, english.lrg,
  70. # and english.xlg.  For each of these, you can also build a "plus"
  71. # version (english.sml+, etc.)  which is created by combining the
  72. # distributed version with an "extra" dictionary defined by EXTRADICT,
  73. # usually /usr/dict/words.  The "plus" versions of dictionaries
  74. # require lots of time and temporary file space; make sure you have
  75. # set TMPDIR appropriately.
  76. #
  77. # The dictionaries to be built are listed in the MASTERDICTS variable,
  78. # separated by spaces.  The hash files to be built (and installed) are
  79. # listed in the HASHFILES variable.  Hash files are named as
  80. # "altamer<xxx>.hash", where <xxx> is the suffix of dictionary (e.g.,
  81. # "med+").  The first-listed hash file will also be installed under
  82. # the name "altamer.hash".  As a general rule, the dictionaries
  83. # needed to build the HASHFILES must be listed in the MASTERDICTS
  84. # variable.
  85. #
  86. # If you change AFFIXES for english, you should consider also changing
  87. # DEFLANG (in config.X) to match.
  88. #
  89. MASTERDICTS    =    Use_LANGUAGES_from_config.X
  90. HASHFILES    =    Use_LANGUAGES_from_config.X
  91. EXTRADICT    =    Use_LANGUAGES_from_config.X
  92.  
  93. #
  94. # The following variables may be overridden by the superior Makefile,
  95. # based on the LANGUAGES variable in config.X.
  96. #
  97. AFFIXES    =    english.aff
  98. LANGUAGE =    altamer
  99.  
  100. #
  101. # DICTSRC specifies where the dictionary sources are found.  You
  102. # should not have to change this.
  103. #
  104. DICTSRC =    ../english
  105.  
  106. #
  107. #    Set this to "-vx" in the make command line if you need to
  108. #    debug the complex shell commands.
  109. #
  110. SHELLDEBUG = +vx
  111.  
  112. all:  $(CONFIG)
  113.     @set $(SHELLDEBUG); \
  114.     if [ ! -r english.0 ]; \
  115.     then \
  116.         $(MAKE) SHELLDEBUG=$(SHELLDEBUG) CBUILD= dictcomponents; \
  117.     else \
  118.         : ; \
  119.     fi
  120.     @set $(SHELLDEBUG); \
  121.     for dict in $(MASTERDICTS); do \
  122.         if [ ! -r $$dict ]; \
  123.         then \
  124.         $(MAKE) DBUILD= \
  125.           'EXTRADICT=$(EXTRADICT)' 'DICTSRC=$(DICTSRC)' \
  126.           SHELLDEBUG=$(SHELLDEBUG) $$dict; \
  127.         else \
  128.         : ; \
  129.         fi; \
  130.     done
  131.     $(MAKE) SHELLDEBUG=$(SHELLDEBUG) $(HASHFILES)
  132.  
  133. install:    all $(CONFIG)
  134.     @. $(CONFIG); \
  135.       set -x; \
  136.       [ -d $$LIBDIR ]  ||  (mkdir $$LIBDIR; chmod 755 $$LIBDIR); \
  137.       cd $$LIBDIR; rm -f english.aff $(HASHFILES) $(LANGUAGE).hash
  138.     @. $(CONFIG); \
  139.       set -x; \
  140.       cp $(DICTSRC)/english.aff $(HASHFILES) $$LIBDIR
  141.     @. $(CONFIG); \
  142.       set -x; \
  143.       cd $$LIBDIR; \
  144.       chmod 644 english.aff $(HASHFILES); \
  145.       for i in $(HASHFILES); do \
  146.         ln $$i $(LANGUAGE).hash; \
  147.         break; \
  148.       done
  149.     @. $(CONFIG); \
  150.       set -x; \
  151.       [ -d $$MAN4DIR ]  ||  (mkdir $$MAN4DIR; chmod 755 $$MAN4DIR); \
  152.       cd $$MAN4DIR; \
  153.         rm -f english$$MAN4EXT
  154.     @. $(CONFIG); \
  155.       set -x; \
  156.       cp $(DICTSRC)/english.4l $$MAN4DIR/english$$MAN4EXT; \
  157.       chmod 644 $$MAN4DIR/english$$MAN4EXT
  158.  
  159. #
  160. #    Dependencies to build extra hash files
  161. #
  162. allhashes:    normhashes plushashes
  163. normhashes:    altamersml.hash altamermed.hash
  164. normhashes:    altamerlrg.hash altamerxlg.hash
  165. plushashes:    altamersml+.hash altamermed+.hash
  166. plushashes:    altamerlrg+.hash altamerxlg+.hash
  167.  
  168. altamersml.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.sml
  169.     rm -f altamersml.hash
  170.     $(BUILDHASH) altamer.sml $(DICTSRC)/$(AFFIXES) altamersml.hash
  171.  
  172. altamersml+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.sml+
  173.     rm -f altamersml+.hash
  174.     $(BUILDHASH) altamer.sml+ $(DICTSRC)/$(AFFIXES) altamersml+.hash
  175.  
  176. altamermed.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.med
  177.     rm -f altamermed.hash
  178.     $(BUILDHASH) altamer.med $(DICTSRC)/$(AFFIXES) altamermed.hash
  179.  
  180. altamermed+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.med+
  181.     rm -f altamermed+.hash
  182.     $(BUILDHASH) altamer.med+ $(DICTSRC)/$(AFFIXES) altamermed+.hash
  183.  
  184. altamerlrg.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.lrg
  185.     rm -f altamerlrg.hash
  186.     $(BUILDHASH) altamer.lrg $(DICTSRC)/$(AFFIXES) altamerlrg.hash
  187.  
  188. altamerlrg+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.lrg+
  189.     rm -f altamerlrg+.hash
  190.     $(BUILDHASH) altamer.lrg+ $(DICTSRC)/$(AFFIXES) altamerlrg+.hash
  191.  
  192. altamerxlg.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.xlg
  193.     rm -f altamerxlg.hash
  194.     $(BUILDHASH) altamer.xlg $(DICTSRC)/$(AFFIXES) altamerxlg.hash
  195.  
  196. altamerxlg+.hash:    $(BUILDHASH) $(DICTSRC)/$(AFFIXES) altamer.xlg+
  197.     rm -f altamerxlg+.hash
  198.     $(BUILDHASH) altamer.xlg+ $(DICTSRC)/$(AFFIXES) altamerxlg+.hash
  199.  
  200. #
  201. #    The eight dictionaries, altamer.sml through altamer.xlg+, are
  202. #    built by the following dependencies.  The macros "CBUILD" and
  203. #    "DBUILD" are a sneaky trick used to keep make from trying to
  204. #    run munchlist every time a minor change is made to one of the
  205. #    C programs.  If you define these macros as null, "make all"
  206. #    will automatically build the dictionaries.  If you leave them
  207. #    with their default definitions, "make all" will leave the
  208. #    dictionaries alone, and you will have to type something like
  209. #    "make buildaltamer.med+" to build the dictionary using
  210. #    munchlist.
  211. #
  212. #    Why two macros?  So you can delete {eng,amer,altamer,brit}.[012].??
  213. #    to save space, and still type "make DBUILD= all".
  214. #
  215. #    The following dependencies are convenient ways to make some or
  216. #    all of the dictionaries.
  217. #
  218. BUILD    =    build
  219. CBUILD    =    $(BUILD)
  220. DBUILD    =    $(BUILD)
  221.  
  222. alldicts:    normdicts plusdicts
  223. normdicts:    $(DBUILD)altamer.sml
  224. normdicts:    $(DBUILD)altamer.med
  225. normdicts:    $(DBUILD)altamer.lrg
  226. normdicts:    $(DBUILD)altamer.xlg
  227. plusdicts:    $(DBUILD)altamer.sml+
  228. plusdicts:    $(DBUILD)altamer.med+
  229. plusdicts:    $(DBUILD)altamer.lrg+
  230. plusdicts:    $(DBUILD)altamer.xlg+
  231.  
  232. $(DBUILD)altamer.sml:    $(DBUILD)english.sml
  233.     rm -f altamer.sml
  234.     ln english.sml altamer.sml
  235.  
  236. $(DBUILD)english.sml:    $(CONFIG)
  237. $(DBUILD)english.sml:    english.0
  238. $(DBUILD)english.sml:    altamer.0
  239.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  240.       'VARIANTS=american altamer' \
  241.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  242.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  243.       english.sml
  244.  
  245. $(DBUILD)altamer.sml+:    $(DBUILD)english.sml+
  246.     rm -f altamer.sml+
  247.     ln english.sml+ altamer.sml+
  248.  
  249. $(DBUILD)english.sml+:    $(CONFIG)
  250. $(DBUILD)english.sml+:    english.0
  251. $(DBUILD)english.sml+:    altamer.0
  252.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  253.       'VARIANTS=american altamer' \
  254.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  255.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  256.       english.sml+
  257.  
  258. $(DBUILD)altamer.med:    $(DBUILD)english.med
  259.     rm -f altamer.med
  260.     ln english.med altamer.med
  261.  
  262. $(DBUILD)english.med:    $(CONFIG)
  263. $(DBUILD)english.med:    english.0
  264. $(DBUILD)english.med:    altamer.0
  265.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  266.       'VARIANTS=american altamer' \
  267.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  268.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  269.       english.med
  270.  
  271. $(DBUILD)altamer.med+:    $(DBUILD)english.med+
  272.     rm -f altamer.med+
  273.     ln english.med+ altamer.med+
  274.  
  275. $(DBUILD)english.med+:    $(CONFIG)
  276. $(DBUILD)english.med+:    english.0
  277. $(DBUILD)english.med+:    altamer.0
  278.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  279.       'VARIANTS=american altamer' \
  280.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  281.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  282.       english.med+
  283.  
  284. $(DBUILD)altamer.lrg:    $(DBUILD)english.lrg
  285.     rm -f altamer.lrg
  286.     ln english.lrg altamer.lrg
  287.  
  288. $(DBUILD)english.lrg:    $(CONFIG)
  289. $(DBUILD)english.lrg:    english.0
  290. $(DBUILD)english.lrg:    altamer.0
  291.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  292.       'VARIANTS=american altamer' \
  293.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  294.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  295.       english.lrg
  296.  
  297. $(DBUILD)altamer.lrg+:    $(DBUILD)english.lrg+
  298.     rm -f altamer.lrg+
  299.     ln english.lrg+ altamer.lrg+
  300.  
  301. $(DBUILD)english.lrg+:    $(CONFIG)
  302. $(DBUILD)english.lrg+:    english.0
  303. $(DBUILD)english.lrg+:    altamer.0
  304.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  305.       'VARIANTS=american altamer' \
  306.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  307.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  308.       english.lrg+
  309.  
  310. $(DBUILD)altamer.xlg:    $(DBUILD)english.xlg
  311.     rm -f altamer.xlg
  312.     ln english.xlg altamer.xlg
  313.  
  314. $(DBUILD)english.xlg:    $(CONFIG)
  315. $(DBUILD)english.xlg:    english.0
  316. $(DBUILD)english.xlg:    altamer.0
  317.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  318.       'VARIANTS=american altamer' \
  319.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  320.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  321.       english.xlg
  322.  
  323. $(DBUILD)altamer.xlg+:    $(DBUILD)english.xlg+
  324.     rm -f altamer.xlg+
  325.     ln english.xlg+ altamer.xlg+
  326.  
  327. $(DBUILD)english.xlg+:    $(CONFIG)
  328. $(DBUILD)english.xlg+:    english.0
  329. $(DBUILD)english.xlg+:    altamer.0
  330.     $(MAKE) -f $(DICTSRC)/Makefile 'DBUILD=$(DBUILD)' \
  331.       'VARIANTS=american altamer' \
  332.       'EXTRADICT=$(EXTRADICT)' 'SHELLDEBUG=$(SHELLDEBUG)' \
  333.       'AFFIXES=$(DICTSRC)/$(AFFIXES)' \
  334.       english.xlg+
  335.  
  336. #
  337. #    Dependencies to create the components of the dictionaries,
  338. #    preferably by linking.  We create some components that we'll
  339. #    never use because the master English Makefile requires them.
  340. #
  341. dictcomponents:    $(CBUILD)english.0
  342. dictcomponents:    $(CBUILD)english.1
  343. dictcomponents:    $(CBUILD)english.2
  344. dictcomponents:    $(CBUILD)english.3
  345. dictcomponents: $(CBUILD)american.0
  346. dictcomponents: $(CBUILD)american.1
  347. dictcomponents:    $(CBUILD)american.2
  348. dictcomponents: $(CBUILD)altamer.0
  349. dictcomponents: $(CBUILD)altamer.1
  350. dictcomponents:    $(CBUILD)altamer.2
  351. dictcomponents: $(CBUILD)british.0
  352. dictcomponents: $(CBUILD)british.1
  353. dictcomponents:    $(CBUILD)british.2
  354.  
  355. $(CBUILD)english.0 $(CBUILD)english.1 $(CBUILD)english.2 $(CBUILD)english.3 \
  356.   $(CBUILD)american.0 $(CBUILD)american.1 $(CBUILD)american.2 \
  357.   $(CBUILD)altamer.0 $(CBUILD)altamer.1 $(CBUILD)altamer.2 \
  358.   $(CBUILD)british.0 $(CBUILD)british.1 $(CBUILD)british.2:
  359.     rm -f english.[0-3] american.[0-2] altamer.[012] british.[012]
  360.     @set $(SHELLDEBUG); \
  361.       cd $(DICTSRC); \
  362.       test -r english.0 \
  363.         ||  $(MAKE) SHELLDEBUG=$(SHELLDEBUG) CBUILD= dictcomponents
  364.     for i in english.0 english.1 english.2 english.3 \
  365.       american.0 american.1 american.2 altamer.0 altamer.1 altamer.2 \
  366.       british.0 british.1 british.2; do \
  367.         ln -s $(DICTSRC)/$$i .  ||  ln $(DICTSRC)/$$i . \
  368.           ||  cp $(DICTSRC)/$$i .; \
  369.     done
  370.  
  371. #
  372. #    The following dependency can be executed when ispell is unpacked,
  373. #    to unpack the dictionaries.
  374. #
  375. unpack:
  376.     cd $(DICTSRC); $(MAKE) SHELLDEBUG=$(SHELLDEBUG) unpack
  377.  
  378. clean:
  379.     rm -f core *.hash *.stat *.cnt
  380.  
  381. #
  382. #    The following target allows you to clean out the leftover raw
  383. #    files gotten from unpacking the kit.  It makes sure that you
  384. #    have the combined files first, so it may take a little while
  385. #    to run.
  386. #
  387. kitclean:
  388.     cd $(DICTSRC); $(MAKE) SHELLDEBUG=$(SHELLDEBUG) kitclean
  389.  
  390. #
  391. #    The following target allows you to clean out the combined
  392. #    dictionary files.
  393. #
  394. dictclean:
  395.     rm -f english.[0-3] american.[0-3] altamer.[0-3] british.[0-3]
  396.     rm -f *.sml *.sml+ *.med *.med+ *.lrg *.lrg+ *.xlg *.xlg+
  397.